package frontend.parser.node.decl;

import frontend.parser.node.Node;
import frontend.parser.node.TokenNode;

public class FuncType extends Node {
    // FuncType → 'void' | 'int'
    private boolean returned;
    public void addFuncTypeTokenNode(TokenNode funcTypeTokenNode) {
        super.add(funcTypeTokenNode);
        switch (funcTypeTokenNode.getToken().getTokenType()) {
            case VOIDTK -> {
                returned = false;
            }
            case INTTK -> {
                returned = true;
            }
        }
    }

    public boolean isReturned() {
        return returned;
    }
}
